--------------------------------------------------------------------------------
      name:  <unnamed>
       log:  E:\Seagate Sync\VOL\Personal folder\Documents\Research\Past project
> s\cbld\Posted\121020 Website\Data analysis\cbld-analysis02-app.log
  log type:  text
 opened on:  21 Oct 2012, 15:42:26

. 
. 
. * ****************************************************************************
> ********************
. * Appendix: Additional results for 'The predicted effects of voting threshold 
> and membership size'
. * ****************************************************************************
> ********************
. 
. * Programme:    cbld-analysis02-app.do
. * Project:              Council coalition building
. * Author:               Frank Haege, Department of Politics and Administration
> , University of Limerick
. * Contact:              frank.haege@ul.ie
. 
. * Description
. *************
. * This do-file generates a table and graphs presenting the results of sensitiv
> ity analyses 
. * of the model's prediction regarding the effect of the new Lisbon treaty voti
> ng rules
. * on consensus rates in the Council. The senstitivity analyses are based on mo
> dels that   
. * incorporate real-world voting weights and thresholds, and in which the seque
> nce of moves 
. * of member states is ordered according to voting weights (from smallest to la
> rgest). 
. 
. 
. * Set up Stata
. version 11

. clear all

. macro drop _all

. set linesize 80

. set more off

. 
. 
. * Prepare data set of predicted consensus rates based on model with weighted v
> otes
. ******************************************************************************
> ****
. 
. * Load data set 
. use "Experiments\Experiment03\cbld-management04-exp03.dta", clear

. 
. * Drop redundant variables
. drop e* se lowerci upperci

. 
. * Generate variable for merge
. generate vthresh = .
(34 missing values generated)

. replace vthresh = 72 if regime <= 9 
(16 real changes made)

. replace vthresh = 74 if regime > 9 & regime <= 15
(12 real changes made)

. replace vthresh = 65 if regime > 15
(6 real changes made)

. 
. * Rename consensus rate variable based on weighted votes
. rename consensus consensusw

. 
. * Label variables
. label var nostates "Number of member states"

. label var vthresh "Voting threshold"

. label var consensusw "Predicted consensus rate (weighted votes)"

. 
. * Reorder variables
. order rulemembersize nostates vthresh regime sequence

. 
. 
. * Merge with and prepare data set of predicted consensus rates based on model 
> without weighted votes
. ******************************************************************************
> **********************
. 
. * Merge data sets
. sort sequence nostates vthresh

. merge m:1 sequence nostates vthresh using "Experiments\Experiment02\cbld-manag
> ement03-exp02.dta"
(label rulemembersizel already defined)

    Result                           # of obs.
    -----------------------------------------
    not matched                             0
    matched                                34  (_merge==3)
    -----------------------------------------

. drop _merge

. 
. * Drop redundant variables
. drop e* se lowerci upperci

. 
. * Rescale consensus rate variables
. replace consensus = consensus * 100
(34 real changes made)

. replace consensusw = consensusw * 100
(34 real changes made)

. 
. * Label variables
. label var consensus "Predicted consensus rate"

. 
. 
. * TABLE A2.     Predicted consensus rates for various model specifications
. **********************************************************************
. 
. * Generate results matrix       
. sort sequence nostates vthresh

. mkmat sequence consensus consensusw /*
>         */ if (regime == 2 | regime == 3 | regime == 4 | regime == 10 | regime
>  == 16) /*
>         */ , matrix(one)

. mkmat  consensusw /*
>         */ if (regime == 2 | regime == 3 | regime == 5 | regime == 11 | regime
>  == 17) /*
>         */ , matrix(two)

. mkmat  consensusw /*
>         */ if (regime == 2 | regime == 3 | regime == 6 | regime == 12 | regime
>  == 18) /*
>         */ , matrix(three)

. matrix consensus = one, two, three

. matrix colnames consensus = "sequence" "Unweighted" "One threshold" "Two thres
> holds" "Three thresholds"

. matrix rownames consensus = "Pre-Nice 12" "Pre-Nice 15" "Nice 25" "Lisbon 27" 
> "Nice 27" "Pre-Nice 12" "Pre-Nice 15" "Nice 25" "Lisbon 27" "Nice 27"     

. matrix consensus = consensus'

. matrix list consensus, format(%9.0f)    

consensus[5,10]
              Pre-Nice 12  Pre-Nice 15      Nice 25    Lisbon 27      Nice 27
    sequence            1            1            1            1            1
  Unweighted           89           85           85           63           88
One thresh~d           86           85           88           59           92
Two thresh~s           86           85           93           64           94
Three thre~s           86           85           94           64           94

              Pre-Nice 12  Pre-Nice 15      Nice 25    Lisbon 27      Nice 27
    sequence            2            2            2            2            2
  Unweighted           90           84           82           64           88
One thresh~d           85           82           86           55           90
Two thresh~s           85           82           92           59           93
Three thre~s           85           82           91           59           94

. 
. 
. * Fig. A9. Predicted consensus rates for models with random sequence of moves
. *****************************************************************************
. 
. * sort data
. sort rulemembersize

. twoway (scatter consensus rulemembersize if sequence == 1 & /*
>         */ (regime == 2 | regime == 3 | regime == 4 | regime == 10 | regime ==
>  16), /*
>         */ c(line) lcolor(white) mcolor(white)) /*
>         */ (scatter consensusw rulemembersize if sequence == 1 & /*
>         */ (regime == 2 | regime == 3 | regime == 4 | regime == 10 | regime ==
>  16), /*
>         */ c(line) lcolor(yellow) mcolor(yellow) msymbol(square)) /*
>         */ (scatter consensusw rulemembersize if sequence == 1 & /*
>         */ (regime == 2 | regime == 3 | regime == 5 | regime == 11 | regime ==
>  17), /*
>         */ c(line) lcolor(yellow) mcolor(yellow) msymbol(diamond)) /*
>         */ (scatter consensusw rulemembersize if sequence == 1 & /*
>         */ (regime == 2 | regime == 3 | regime == 6 | regime == 12 | regime ==
>  18), /*
>         */ c(line) lcolor(yellow) mcolor(yellow) msymbol(triangle)) /*
>         */ , ytitle("Consensus Rate (%)") ylabel(50 60: 100) xlabel(, valuelab
> el) xscale(range(0.5 5.5)) /*
>         */ legend(order(1 "Unweighted" 2 "One threshold" 3 "Two thresholds" 4 
> "Three thresholds") /*
>         */ cols(1) ring(0) position(7) bmargin(large) region(style(none)))

. 
. 
. * Fig. A10. Predicted consensus rates for models with sequence of moves ordere
> d by size
. ******************************************************************************
> *********
.         
. twoway (scatter consensus rulemembersize if sequence == 2 & /*
>         */ (regime == 2 | regime == 3 | regime == 4 | regime == 10 | regime ==
>  16), /*
>         */ c(line) lcolor(white) mcolor(white)) /*
>         */ (scatter consensusw rulemembersize if sequence == 2 & /*
>         */ (regime == 2 | regime == 3 | regime == 4 | regime == 10 | regime ==
>  16), /*
>         */ c(line) lcolor(yellow) mcolor(yellow) msymbol(square)) /*
>         */ (scatter consensusw rulemembersize if sequence == 2 & /*
>         */ (regime == 2 | regime == 3 | regime == 5 | regime == 11 | regime ==
>  17), /*
>         */ c(line) lcolor(yellow) mcolor(yellow) msymbol(diamond)) /*
>         */ (scatter consensusw rulemembersize if sequence == 2 & /*
>         */ (regime == 2 | regime == 3 | regime == 6 | regime == 12 | regime ==
>  18), /*
>         */ c(line) lcolor(yellow) mcolor(yellow) msymbol(triangle)) /*
>         */ , ytitle("Consensus Rate (%)") ylabel(50 60: 100) xlabel(, valuelab
> el) xscale(range(0.5 5.5)) /*
>         */ legend(order(1 "Unweighted" 2 "One threshold" 3 "Two thresholds" 4 
> "Three thresholds") /*
>         */ cols(1) ring(0) position(7) bmargin(large) region(style(none)))

. 
. 
. log close
      name:  <unnamed>
       log:  E:\Seagate Sync\VOL\Personal folder\Documents\Research\Past project
> s\cbld\Posted\121020 Website\Data analysis\cbld-analysis02-app.log
  log type:  text
 closed on:  21 Oct 2012, 15:42:28
--------------------------------------------------------------------------------
